package com.ferret.bean.entity;

import com.ferret.bean.Constants;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Data
public class VIIDServer {

    @Id
    private String serverId;
    private String serverName;
    private String scheme = "http";
    private String host;
    private Integer port;
    private String username;
    private String authenticate;
    private Integer enabled;
    private String category;
    private Date createTime;
    private Boolean keepalive;
    private String transmission = Constants.VIID_SERVER.TRANSMISSION.HTTP;
    private Integer online = 1;

    public String httpUrlBuilder() {
        return scheme + "://" + host + ":" + port;
    }
}
